package com.iris.live.services.services;

import com.iris.live.services.data.models.临时接待记录Model;
import com.iris.live.services.data.models.销售顾问状态Model;
import com.iris.live.services.models.RequestBase;
import com.iris.live.services.models.ResultData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ForeGroundService {
    static Logger logger = LoggerFactory.getLogger(ForeGroundService.class);

    List getUnfinishTRRecord(GetTemporaryReceptionRecordRequest request);

	List getReceptionTimeAndNumberByRNum(Integer teampReceptionNum);

    boolean updTeampRecepInfoAndCustInStoreInfo(Integer teampReceptionNum, String xuke, String zahgnhao);

	boolean updTeampRecepForChangeSale(UpdTeampRecepForChangeSaleRequest request);

	boolean cancelSalesConsultant(Integer teampReceptionNum);

    ResultData updSalesConsultantStartDriveTime(Integer teampReceptionNum);

    ResultData updSalesConsultantEndDriveTime(Integer teampReceptionNum);

    ResultData testDriveProcess(Integer flag, Integer tempReceptionNum);

	boolean updSalesConsultantEndDriveTimeByDate(UpdSalesConsultantEndDriveTimeByDateRequest request);

	List getCurrentDaySalePerson(String permit, Date date);

    List getCurrentDaySaleWork(String permit, Date date);

    List getSaleUnDoneService(String permit, Date date);

    List getSalePicPath(String permit);

    boolean saveSaleTempRecord(临时接待记录Model tempServModel);

    Map saveSaleTempRecordBySC(String Dealer, String User, String startTime);

    boolean updateSalePersonStatus(销售顾问状态Model saleStatusModel);

    int updateSalePersonStatus(List<销售顾问状态Model> saleStatusList);

    String getSaleStatusCode(销售顾问状态Model saleStatusMode);

    boolean updateSCStatus(String permit, List<ForeGroundService.GetUpdateSCStatus> list);

    static class GetTemporaryReceptionRecordRequest extends RequestBase {
        public String permit;
        public String salesConsultant;//销售顾问
        public Date date;
    }

    static class UpdTeampRecepForChangeSaleRequest extends RequestBase {
        public String 销售顾问;
        public String 接待类型;
        public Integer 临时接待编号;
    }

    static class UpdSalesConsultantEndDriveTimeByDateRequest extends RequestBase {
        public String 许可;
        public String 销售顾问;
        public Date 日期;
    }

	static class saleInfoReq extends RequestBase{
		public String permit;
		private String date;

        public Date getDate() {
            Date currentDate = new Date();
	    	try {
				currentDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date);
			} catch (ParseException e) {
                logger.error("运行异常。", e);
		    	currentDate = new Date();
			}
	    	return currentDate;
		}
	}

    class testDriveProcessRequest {
        public Integer flag;
        public Integer tempReceptionNum;
    }

    class GetUpdateSCStatus {
        public String 排班顺序;
        public String 日期;
        public String 是否当班;
        public String 销售顾问;
        public String 状态码;
    }


}
